Repository navigation
Parse table/guildraid.xml - #98
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
A guild raid clear should add guild exp and guild fund. Each level's base amounts are in
table/guildproperty.xml, andtable/guildraid.xmlholds the factor that scales them for each raid room. Nothing parsedguildraid.xml, so the emulator can't read those factors. This adds the type andTableParser.ParseGuildRaid().Xml/Table/GuildRaid.cs, new: the four attributes eachguildRaidrow carries,dungeonRoomID,clearRaidPoint,clearGuildExpandclearGuildFund. The two factors are floats because the XML ships values like1.25and1.75.featureandlocalecome fromM2dFeatureLocalekeyed ondungeonRoomID, the same wayGuildQuestRewardFactorandGuildBufffilter their rows.TableParser.cs:ParseGuildRaid()yields each row that survives feature filtering, keyed by room id. The file needs no sanitising.TableParserTest.TestGuildRaid: under NA Live the parser returns exactly rooms 26001001 to 26005001. The test checks room 26001001 at 1000, 1 and 1, room 26004001 at 1000, 1.3 and 1.75, and room 26005001 at 1.4 and 2, as the shipped XML states. All rows are underGuildRaid01, whichfeature.xmlsets to 35 for NA, below the NA Live setting of 47.The GMS2 file and the KMS2 end-of-service copy are the same 5 rows with the same attributes and values. They differ only in line endings, so the type fits both.
The consumer is MS2Community/PrivateMaple2#2272. Guild raid clears there add no guild exp or fund, and the fix needs this package.
Verification
dotnet buildsucceeds.dotnet test Maple2.File.Tests --filter "FullyQualifiedName~TableParserTest"ran against the GMS2 archives. 158 passed and 1 failed.TestGuildRaidpasses.TestFieldMetaData, and it fails the same way onmasterwithout this change. Its assertion expects field 2000250's portal to field 2000114 to haveportalIndoorset, but the shipped NAfieldmetadata.xmlrow hasportalIndoor="0". I left it alone because it falls outside this change.dotnet format whitespace --verify-no-changesis clean on the touched files.dotnet pack Maple2.File.Parser/Maple2.File.Parser.csproj -c Release -p:PackageVersion=2.4.39-debug.0was restored into a scratch emulator worktree, withMaple2.File.Ingestpointed at it.dotnet build Maple2.File.Ingestsucceeded. A small probe there opened the realXml.m2dthe ingest reads, ranFilter.Load(reader, "NA", "Live")andParseGuildRaid(), and printed 5 rows: 26001001 1000/1/1, 26002001 1000/1.1/1.25, 26003001 1000/1.2/1.5, 26004001 1000/1.3/1.75, 26005001 1000/1.4/2, allGuildRaid01.TableParserTest, not the rest ofMaple2.File.Tests.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by CodeRabbit